<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

    <f:view contentType="text/html">
        <h:head>
            <f:facet name="first">
                <meta http-equiv="X-UA-Compatible" content="EmulateIE8" />
                <meta content='text/html; charset=UTF-8' http-equiv="Content-Type"/>
                <title>Sistema Clinica Odontológica</title>
            </f:facet>

            <style type="text/css">
                *{
                    font-size: 12px !important;
                }
                .ui-layout-north {
                    z-index:20 !important;
                    overflow:visible !important;
                }

                .ui-layout-north .ui-layout-unit-content {
                    overflow:visible !important;
                }
            </style>
        </h:head>

        <h:body>

            <p:layout fullPage="true" >

                <p:layoutUnit id="top" position="north" size="50">
                    <h:form id="formMenu">
                        <p:menubar autoDisplay="true">
                            <p:submenu label="Cadastros" icon="ui-icon-wrench">
                                <p:menuitem value="Doutor" ajax="false">
                                    <f:setPropertyActionListener value="/cadastros/cadDoutor.xhtml" target="#{requisicaoBean.urlCentro}" />
                                </p:menuitem>   
                                <p:menuitem value="Pessoa" ajax="false">
                                    <f:setPropertyActionListener value="/cadastros/cadPessoa.xhtml" target="#{requisicaoBean.urlCentro}" />
                                </p:menuitem> 
                                <p:menuitem value="Item" ajax="false">
                                    <f:setPropertyActionListener value="/cadastros/cadItem.xhtml" target="#{requisicaoBean.urlCentro}" />
                                </p:menuitem> 
                                <p:menuitem value="Excessao" ajax="false">
                                    <f:setPropertyActionListener value="/cadastros/cadExcessao.xhtml" target="#{requisicaoBean.urlCentro}" />
                                </p:menuitem> 
                            </p:submenu>
                            <p:submenu label="Agendamento" icon="ui-icon-wrench">
                                <p:menuitem value="Efetuar" ajax="false">
                                    <f:setPropertyActionListener value="/cadastros/cadAgendamento.xhtml" target="#{requisicaoBean.urlCentro}" />
                                </p:menuitem>    
                            </p:submenu>
                            <p:submenu label="Logout">
                                <p:menuitem value="Logout" ajax="false" actionListener="#{loginBean.logout}"/>
                            </p:submenu>
                        </p:menubar>
                    </h:form>
                </p:layoutUnit>

                <p:layoutUnit id="bottom" position="south" size="60">
                    <h:outputText value="#{loginBean.validaUsuarioSessaoPrincipal}"/>
                </p:layoutUnit>

                <p:layoutUnit id="right" position="east" size="220" header="Calendário" resizable="true" closable="true" collapsible="true"
                              style="text-align:center">
                    <p:calendar mode="inline" navigator="none"/>

                </p:layoutUnit>


                <p:layoutUnit id="center" position="center" >
                    <ui:include src="#{requisicaoBean.urlCentro}" />
                </p:layoutUnit>

            </p:layout>

        </h:body>

    </f:view>
</html>